using System;
using System.Collections.Generic;
using System.Text;
using System.Xml.Serialization;

namespace ControlPoint.ControlAPI
{
	public struct Setting
	{
		string _name;
        bool _public;
        bool _ignore;
        bool _readonly;
		Object _value;

        [XmlAttribute]
		public string Name
		{
			get
			{
                return this._name;
			}
			set
			{
                this._name = value;
			}
		}

        [XmlIgnore]
        public bool Ignore { 
            get {return this._ignore;}
            set { this._ignore = value; } 
        }
		
        [XmlIgnore]
        public bool ReadOnly { 
            get {return this._readonly;}
            set { this._readonly = value; } 
        }

        [XmlAttribute, System.ComponentModel.DefaultValue(true)]
        public bool Public {
            get {
                return this._public;
            }
            set {
                this._public = value;
            }
        }
        

		public Object Value
		{
			get
			{
                return this._value;
			}
			set
			{
                this._value = value;
			}
		}

		public Setting(string name, Object value)
		{
            this._name = name;
            this._public = false;
            this._value = value;
			this._readonly = false;
            this._ignore = false;
		}

        public Setting(string name, Object value, bool ipublic) {
            this._name = name;
            this._public = ipublic;
            this._value = value;
            this._ignore = false;
			this._readonly = false;
        }

        public Setting(string name, Object value, bool ipublic, bool ignore ) {
            this._name = name;
            this._public = ipublic;
            this._value = value;
            this._ignore = ignore;
			this._readonly = false;
        }

        public Setting(string name, Object value, bool ipublic, bool ignore, bool ireadonly ) {
            this._name = name;
            this._public = ipublic;
            this._value = value;
            this._ignore = ignore;
			this._readonly = ireadonly;
        }
	}
}
